require "watir"
require "watir/testcase"
require 'test/unit/ui/console/testrunner'
require File.dirname(__FILE__) + '/OrgSearch.rb'
require File.dirname(__FILE__) + '/Reminder.rb'
require File.dirname(__FILE__) + '/Contacts.rb'

class ZMain
    include Test::Unit::UI::Console

    $url="https://crmint.dev.activenetwork.com/"
    begin
        $ie=Watir::IE.find(:title,/ActiveCRM/)
        $log=Reporting.new(File.dirname(__FILE__)+'/../doc/report/')

        testcases = [OrgSearch , NewOrg, Reminder, Contacts]
        testcases.each{|testcase| 
            TestRunner.run(testcase)}
    rescue
        puts $!
        puts $@
    ensure
        $log.close unless $log.nil?
        
    end
end